package com.siloam.module;

import java.util.List;

/**
 * 人员
 * @author rzpeng
 *
 */
public class User {
	
	/**
	 * 人员状态：在团契
	 */
	public static final int STATUS_STAY = 1;
	/**
	 * 人员状态：离开团契
	 */
	public static final int STATUS_LEAVE = 2;
	/**
	 * 人员状态：无效
	 */
	public static final int STATUS_INVALID = 3;
	
	private int id;
	private String name;
	private String username;
	private String password;
	private String qq;
	private int status;
	
	private List<GroupUser> groupUsers;
	private List<Role> roles;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getQq() {
		return qq;
	}
	public void setQq(String qq) {
		this.qq = qq;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public List<GroupUser> getGroupUsers() {
		return groupUsers;
	}
	public void setGroupUsers(List<GroupUser> groupUsers) {
		this.groupUsers = groupUsers;
	}
	public List<Role> getRoles() {
		return roles;
	}
	public void setRoles(List<Role> roles) {
		this.roles = roles;
	}
	
	public String getStatusText(){
		if(status == STATUS_STAY){
			return "在团契";
		} else if(status == STATUS_LEAVE){
			return "离开团契";
		} else {
			return "无效";
		}
	}
	
}
